package com.bussiness.system.controller;

import com.bussiness.system.api.StudentApi;
import com.bussiness.system.entity.StudentEntity;
import com.bussiness.system.face.StudentService;
import com.bussiness.system.query.student.StudentQuery;
import com.bussiness.system.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: xlr
 * @Date: 2018/8/11 14:44
 * @Description:
 */
@RestController
public class StudentController implements StudentApi {

    @Autowired
    StudentService studentService;

    @Override
    public Result getStudentDetail(StudentQuery query) {
        StudentEntity studentEntity = studentService.selectById(query);
        return new Result<StudentEntity>().success(studentEntity);
    }
}
